from flask import Flask
#导入配置文件
from config import Config
from flask_sqlalchemy import SQLAlchemy
from flask_migrate import Migrate
from flask_login import LoginManager 
app = Flask(__name__)
#添加配置信息
login=LoginManager(app)
login.login_view='login'
app.config.from_object(Config)
db =SQLAlchemy(app)
migrate =Migrate(app,db)
@app.before_first_request

def create_tables():
   
    db.create_all()

from app import routes,models